MAIN = attacker
CC = nvcc

DEBUG_ARGS = out.bin

INCLUDE_PATH = -I/home/abc/cuda/include/
LIB_PATH = -L/home/abc/cuda/lib/ -L/home/abc/cuda/sdk/C/common/inc/ 
LIB = -lcuda -lcublas
FLAGS = -O3
DEBUG_FLAGS_OPT = -O3 -g -G0
DEBUG_FLAGS = -g -G0
EXTENSIONS =*.cu

COMPILE_STRING = $(CC) -o $(MAIN) $(INCLUDE_PATH) $(LIB_PATH) $(LIB) $(FLAGS) $(EXTENSIONS)
COMPILE_STRING_DEBUG_OPT = $(CC) -o $(MAIN) $(INCLUDE_PATH) $(LIB_PATH) $(LIB) $(DEBUG_FLAGS_OPT) $(EXTENSIONS)
COMPILE_STRING_DEBUG = $(CC) -o $(MAIN) $(INCLUDE_PATH) $(LIB_PATH) $(LIB) $(DEBUG_FLAGS) $(EXTENSIONS)

prog : $(MAIN)
$(MAIN) : 
	$(COMPILE_STRING)

test1:
	@echo ""
	@echo "------------------------------------------"
	-- rm $(MAIN)
	$(COMPILE_STRING_DEBUG)
	@echo "--------------- RUNNING... ---------------"
	-- ./$(MAIN) $(DEBUG_ARGS)
	
test2:
	@echo ""
	@echo "------------------------------------------"
	-- rm $(MAIN)
	$(COMPILE_STRING_DEBUG_OPT)
	@echo "--------------- RUNNING... ---------------"
	-- cuda-memcheck --continue $(MAIN) $(DEBUG_ARGS)
test3:
	@echo ""
	@echo "------------------------------------------"
	-- rm $(MAIN)
	$(COMPILE_STRING_DEBUG)
	@echo "--------------- RUNNING... ---------------"
	gdb --args $(MAIN) $(DEBUG_ARGS)
	
	
	
